package com.jmp.feign;

import com.jmp.base.LabelApi;
import one.stand.entity.excel.CustomerExcelEntity;
import one.stand.fallback.CrmFallBack;
import one.stand.model.CompanyApplyRecordModel;
import one.stand.model.ResultModel;
import one.stand.request.*;
import one.stand.response.*;
import one.stand.util.ExportDataDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 */
@Component
@FeignClient(value = "crm-service", fallback = CrmFallBack.class, decode404 = true)
public interface CrmFegin {

    /**
     * CRM-PC端首页统计
     *
     * @param request
     * @return
     */
    @PostMapping("seeRecord/getPcCount")
    ResultModel<Map<String, Object>> getPcCount(@RequestBody SeeRecordRequest request);

    /**
     * CRM-PC端首页转化率漏斗
     *
     * @param request
     * @return
     */
    @PostMapping("seeRecord/getChangeCount")
    ResultModel<Map<String, Object>> getChangeCount(@RequestBody SeeRecordRequest request);

    /**
     * 圆饼图
     *
     * @param request
     * @return
     */
    @PostMapping("seeRecord/countCustomerAnalysis")
    ResultModel countCustomerAnalysis(@RequestBody SeeRecordRequest request);

    /**
     * 近7日成交额
     *
     * @return
     */
    @RequestMapping("dataCount/sevenData")
    ResultModel sevenData(@RequestBody FinanceRequest request);

    /**
     * 获取公司员工
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/getCompanyStaffList")
    ResultModel<Map<String, Object>> getCompanyStaffList(@RequestBody BusinessCardRequest request);

    /**
     * 得到公司员工信息
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/getCompanyStaffInfo")
    ResultModel<GetCompanyStaffResponse> getCompanyStaffInfo(@RequestBody BusinessCardRequest request);

    /**
     * 存为客户
     *
     * @param request
     * @return
     */
    @PostMapping("customer/addCustomer")
    ResultModel<Boolean> addCustomer(@RequestBody CustomerRequest request);

    /**
     * 客户类型分组统计
     *
     * @param request
     * @return
     */
    @PostMapping("customer/countCustomer")
    ResultModel<List<CustomerResponse>> countCustomer(@RequestBody CustomerRequest request);

    /**
     * 获取客户列表
     *
     * @param request
     * @return
     */
    @PostMapping("customer/getCustomerPC")
    ResultModel<Map<String, Object>> getCustomerPC(@RequestBody CustomerRequest request);

    /**
     * 导出获取客户列表
     *
     * @return
     */
    @PostMapping("customer/getCustomerExport")
    ResultModel<ExportDataDTO<CustomerExcelEntity>> getCustomerExport(@RequestBody CustomerRequest request);

    /**
     * 获取客户信息
     *
     * @param cardId
     * @return
     */
    @PostMapping("customer/getCustomerInfo")
    ResultModel<GetCustomerInfoResponse> getCustomerInfo(@RequestParam("cardId") Long cardId);

    /**
     * 手动创建客户
     *
     * @return
     */
    @PostMapping("customer/manualAdd")
    ResultModel<Boolean> manualAdd(@RequestBody CustomerRequest request);

    /**
     * 修改客户类型
     *
     * @return
     */
    @PostMapping("customer/updCustomer")
    ResultModel<Boolean> updCustomer(@RequestBody CustomerRequest request);

    /**
     * 录入成交金额
     *
     * @return
     */
    @PostMapping("/customer/inputDealMoney")
    ResultModel<Boolean> inputDealMoney(@RequestBody InputDealMoneyRequest request);

    /**
     * 企业客户下拉框
     *
     * @param request
     * @return
     */
    @PostMapping("customer/getCustomerList")
    ResultModel<List<CustomerResponse>> getCustomerList(@RequestBody CustomerRequest request);

    /**
     * 获取成交记录
     *
     * @param request
     * @return
     */
    @PostMapping("inputDealMoney/getInputDealList")
    ResultModel<List<InputDealMoneyResponse>> getInputDealList(@RequestBody InputDealMoneyRequest request);

    /**
     * 修改客户标签
     *
     * @param request
     * @return
     */
    @PostMapping("customer/updCustomerLabel")
    ResultModel<String> updCustomerLabel(@RequestBody CustomerRequest request);

    /**
     * 修改客户类型
     *
     * @param request
     * @return
     */
    @PostMapping("customer/updBatchCustomerState")
    ResultModel<String> updBatchCustomerState(@RequestBody CustomerRequest request);

    /**
     * 获取客户标签树
     *
     * @param request
     * @return
     */
    @PostMapping("companyCustomerLable/getTree")
    ResultModel<List<CompanyCustomerLableResponse>> getTree(@RequestBody CompanyCustomerLableRequest request);

    /**
     * 企业员工移交客户
     *
     * @param request
     * @return
     */
    @PostMapping("userTask/moveCustomer")
    ResultModel moveCustomer(@RequestBody CustomerRequest request);

    /**
     * 录入跟进记录
     *
     * @param request
     * @return
     */
    @PostMapping("followRecord/addFollow")
    ResultModel<Boolean> addFollow(@RequestBody FollowRecordRequest request);

    /**
     * 获取跟进记录
     *
     * @param request
     * @return
     */
    @PostMapping("followRecord/getFollowList")
    ResultModel<List<FollowRecordResponse>> getFollowList(@RequestBody FollowRecordRequest request);

    /**
     * 移动商品信息
     */
    @PostMapping("goods/moveGoodsInfo")
    ResultModel<Boolean> moveGoodsInfo(@RequestBody GoodsRequest request);

    /**
     * 添加/修改商品信息
     */
    @PostMapping("goods/addGoodSpecInfo")
    ResultModel addGoodSpecInfo(@RequestBody GoodSpecRequest request);

    /**
     * 删除商品信息
     */
    @PostMapping("goods/delGoodsInfo")
    ResultModel delGoodsInfo(@RequestBody GoodsRequest request);

    /**
     * 删除商品信息
     */
    @PostMapping("goods/delGoodSpecInfo")
    ResultModel delGoodSpecInfo(@RequestBody GoodSpecRequest request);

    /**
     * 个人企业信息
     *
     * @param request
     * @return
     */
    @PostMapping("company/getCompany")
    ResultModel<CompanyResponse> getCompany(@RequestBody CompanyRequest request);

    /**
     * crmPC-支付
     *
     * @param request
     * @return
     */
    @PostMapping("company/payment")
    ResultModel<String> payment(@RequestBody CompanyAccountRequest request);

    @PostMapping("company/backPayMent")
    String backPayMent(String request);

    /**
     * 转移产品
     */
    @PostMapping("goods/transferGoods")
    ResultModel transferGoods(@RequestBody GoodsRequest request);

    /**
     * 获取行业
     *
     * @param
     * @return
     */
    @PostMapping("industry/getList")
    ResultModel<List<IndustryResponse>> getList();

    /**
     * 修改订单退款状态1未申请，2退款申请中，3退款成功
     */
    @PostMapping("orders/updateRefundState")
    ResultModel updateRefundState(@RequestBody OrdersRequest request);

    /**
     * 分销管理-数据统计
     */
    @PostMapping("distribution/getRoyaltyData")
    ResultModel<Map<String, Object>> getRoyaltyData(@RequestBody RoyaltyRecordRequest request);

    /**
     * 设置分销金额比例
     */
    @PostMapping("distribution/companyRoyalty")
    ResultModel<Boolean> companyRoyalty(@RequestBody CompanyRoyaltyRequest request);

    /**
     * 分销订单列表
     */
    @PostMapping("distribution/selectRoyaltyOrderList")
    ResultModel selectRoyaltyOrderList(@RequestBody OrdersRequest request);

    /**
     * 分销订单详情
     */
    @PostMapping("distribution/getRoyaltyOrderInfo")
    ResultModel getRoyaltyOrderInfo(@RequestBody OrdersRequest request);

    /**
     * 佣金排行列表
     */
    @PostMapping("distribution/selectRoyaltyRankList")
    ResultModel<Map<String, Object>> selectRoyaltyRankList(@RequestBody RoyaltyRecordRequest request);

    /**
     * 企业到账记录列表
     *
     * @param request
     * @return
     */
    @PostMapping("distribution/selectCompanyTransferList")
    ResultModel<Map<String, Object>> selectCompanyTransferList(@RequestBody CompanyTransferRequest request);

    /**
     * 更改结算状态
     *
     * @param request
     * @return
     */
    @PostMapping("distribution/updateCompanyTransferState")
    ResultModel<Boolean> updateCompanyTransferState(@RequestBody CompanyTransferRequest request);

    @PostMapping("goods/updateGoods")
    ResultModel updateGoods(GoodsRequest request);

    @PostMapping("goods/agent")
    ResultModel agentGoods(GoodsRequest request);

    @PostMapping("company/apply/updateState")
    ResultModel applyUpdateState(CompanyApplyRecordModel request);

    @PostMapping("company/apply/category/list")
    ResultModel companyCategoryList(CompanyCategoryModelRequest request);

    @PostMapping("company/apply/list")
    ResultModel applyList(CompanyApplyRecordModel request);

    @PostMapping("company/apply/add")
    ResultModel applyAdd(CompanyApplyRecordModel request);

    @PostMapping("company/apply/supply/list")
    ResultModel applySupplyList(CompanyApplyRecordModel request);
}
